package edu.ccut.saturn.studio.core.util.action;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;

/**
 * Action基类
 * 
 * @author 谷钰
 * @version 1.0 2008.12.06
 * 
 */
public class SaturnAction extends Action implements IObjectActionDelegate, IWorkbenchWindowActionDelegate {

	private Shell shell;
	
	private IStructuredSelection structuredselection ;
	
	public void run(IAction iaction) {
		run();
	}

	public void selectionChanged(IAction iaction, ISelection iselection) {
	}

	public void setActivePart(IAction iaction, IWorkbenchPart iworkbenchpart) {
		shell = iworkbenchpart.getSite().getShell();
	}

	protected Shell getShell() {
		return shell;
	}
	
	public void setStructuredSelection(IStructuredSelection structuredselection) {
		this.structuredselection = structuredselection;
	}

	public IStructuredSelection getStructuredSelection() {
		return structuredselection;
	}

	public void dispose() {
	}

	public void init(IWorkbenchWindow window) {
	}
}
